package itheime.com.fileDemo;

import java.io.FileOutputStream;
import java.io.IOException;

public class Test8 {
    public static void main(String[] args){
        FileOutputStream fos=null;
        try {
//            System.out.println(2/0);
            fos = new FileOutputStream("Day11\\a.txt");
            fos.write("hello".getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if(fos!=null){
                try {
                    fos.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
